﻿using System;
using System.Collections.Generic;
using PagedList;
using CodeCamp.Models.Shared;

namespace CodeCamp.Models.Sessions
{
    public interface ISessionSearchFiler
    {
        int EventId { get; }
        string TitleStart { get; }
        string TagPart { get; }
    }

    public class SessionSearchViewModel : ISessionSearchFiler
    {
        public int EventId { get; set; }
        public Nullable<int> Page { get; set; }
        public Nullable<int> RowsPerPage { get; set; }
        public string SearchButton { get; set; }
        public IPagedList<SessionListViewModel> SearchResults { get; set; }

        public string TagPart { get; set; }
        public string TitleStart { get; set; }

        public string ClearButton { get; set; }
        public string UTCOffsetMinutes { get; set; }
        public Nullable<int> UTCAdjustMinutes
        {
            get
            {
                return TimeAdjust.UTCAdjustMinutes(UTCOffsetMinutes);
            }
        }
    }
}